﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ViCode_LeVi.KeyGen
{
    /// <summary>
    /// Interaction logic for Window_InputKey.xaml
    /// </summary>
    public partial class Window_InputKey : Window
    {
        public Window_InputKey()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(Window_InputKey_Loaded);
        }

        void Window_InputKey_Loaded(object sender, RoutedEventArgs e)
        {
            Button_OK.Click += new RoutedEventHandler(Button_OK_Click);
            Button_Canel.Click += new RoutedEventHandler(Button_Canel_Click);
        }

        void Button_Canel_Click(object sender, RoutedEventArgs e)
        {
            Application.Current.Shutdown();
        }

        void Button_OK_Click(object sender, RoutedEventArgs e)
        {
            if (KeyGenHelper.InputKey(PasswordBox_Key.Text) == true)
            {
                this.Close();
            }
        }
    }
}
